Skip to content

Conversation

@ajinkyasurya
Copy link
Contributor

  • Adds a pollErrorHandler func(error) to Client struct.
  • Instead of just logging exception in pollEnvironment(), trigger callback function when UpdateEnvironment fails.

* Remove handler from pollEnvironment to UpdateEnvironment
* Rename handler to errorHandler
* Create a struct FlagsmithErrorHandler so that we can return error and other client response details
@ajinkyasurya ajinkyasurya force-pushed the ajinkyasurya/pollErrorHandler branch from e660035 to 54ff6e5 Compare September 26, 2024 17:59
Copy link
Contributor

@rolodato rolodato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall approach looks good, but I'd like to finalise the types/names with feedback from @gagantrivedi 👍

@ajinkyasurya ajinkyasurya changed the title feat: Add pollErrorHandler to handle pollEnvironment errors feat: Add errorHandler to handle UpdateEnvironment() errors Sep 27, 2024
@rolodato rolodato changed the title feat: Add errorHandler to handle UpdateEnvironment() errors feat: Add a configurable error handler for environment updates. Return response codes on HTTP errors Sep 30, 2024
@rolodato rolodato merged commit a6faf98 into Flagsmith:main Sep 30, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants